package com.tj.test.sys.tool;
/*通用的组件分页类*/
public class BasePage {
    private Integer page=Integer.valueOf(1);//设置默认第一页
    private Integer pageSize=Integer.valueOf(10);//每页显示的行数
    private Integer startIndex;//设置开始索引
    private Integer endIndex;//设置结束索引
    private Pager pager=new Pager();

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getStartIndex() {
        return startIndex;
    }

    public void setStartIndex(Integer startIndex) {
        this.startIndex = (this.page.intValue()-1)*(this.pageSize.intValue()+1);
    }

    public Integer getEndIndex() {
        return endIndex;
    }

    public void setEndIndex(Integer endIndex) {
        this.endIndex = endIndex;
    }

    public Pager getPager() {
        return pager;
    }

    public void setPager(Pager pager) {
        this.pager = pager;
    }
}
